#define _CRT_SECURE_NO_WARNINGS 1

#include "List.h"

//void Test1()
//{
//	LTNode* plist = LTInit();
//
//	LTPushBack(plist, 1);
//	LTPushBack(plist, 2);
//	LTPushBack(plist, 3);
//	LTPushBack(plist, 4);
//	LTPrint(plist);
//
//	LTPopBack(plist);
//	LTPopBack(plist);
//	LTPrint(plist);
//
//}

void Test2()
{
	LTNode* plist = LTInit();

	LTPushFront(plist, 1);
	LTPushFront(plist, 2);
	LTPushFront(plist, 3);
	LTPushFront(plist, 4);
	LTPrint(plist);

	/*LTPopFront(plist);
	LTPopFront(plist);
	LTPrint(plist);*/

	LTNode* find = LTFind(plist, 2);
	if (find != NULL)
	{
		printf("%d\n", find->data);
	}

	LTInsert(find, 20);
	LTPrint(plist);

	LTErase(plist, find);
	LTPrint(plist);

}

int main()
{
	//Test1();
	Test2();
	return 0;
}